import {hrAjax as proFetch} from "src/hrpub/common/utils/utils";

export default function getSysConf(orgValue) {
    if (!orgValue || !orgValue.refpk) return;
    const {pageInfo} = this.props;
    return proFetch({
        url: '/nccloud/hrhi/sysparam/SysinitParamQueryAction.do',
        body: {
            pk_org: orgValue.refpk,
            sysPrarms: ['HI0003']
        },
    }).then(res => {
        if (res.success) {
            if (res.data && res.data['HI0003'] && Number(res.data['HI0003'])) {
                this.props.updateState({
                    pageInfo: {
                        ...pageInfo,
                        pageSize: Number(res.data['HI0003'])
                    }
                })
            }
        }
    })
}
